# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=rofi-json-menu
pkgver=0.2.0
pkgrel=0
pkgdesc="Plugin to use rofi for custom menus"
url="https://github.com/marvinkreis/rofi-json-menu"
arch="all"
license="MIT"
depends="cmd:rofi"
makedepends="
	cmake
	json-c-dev
	rofi-dev
	"
source="https://github.com/marvinkreis/rofi-json-menu/archive/$pkgver/rofi-json-menu-$pkgver.tar.gz"
options="!check"  # no tests provided

build() {
	local crossopts=
	if [ "$CBUILD" != "$CHOST" ]; then
		crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		$crossopts .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
7936cea77aebd8163c285a0ef0c699fedb6a3de03b7e98ceee79b21b4d5519032968b3a31397c60270c5bf3e4b62450d05af185e324b1ac503ae358c09e7e3e0  rofi-json-menu-0.2.0.tar.gz
"
